package com.ruoyi.wb.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wb.mapper.WbSignMapper;
import com.ruoyi.wb.domain.WbSign;
import com.ruoyi.wb.service.IWbSignService;

/**
 * 签到Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-14
 */
@Service
public class WbSignServiceImpl implements IWbSignService 
{
    @Autowired
    private WbSignMapper wbSignMapper;

    /**
     * 查询签到
     * 
     * @param id 签到主键
     * @return 签到
     */
    @Override
    public WbSign selectWbSignById(Long id)
    {
        return wbSignMapper.selectWbSignById(id);
    }

    /**
     * 查询签到列表
     * 
     * @param wbSign 签到
     * @return 签到
     */
    @Override
    public List<WbSign> selectWbSignList(WbSign wbSign)
    {
        return wbSignMapper.selectWbSignList(wbSign);
    }

    /**
     * 新增签到
     * 
     * @param wbSign 签到
     * @return 结果
     */
    @Override
    public int insertWbSign(WbSign wbSign)
    {
        wbSign.setCreateTime(DateUtils.getNowDate());
        return wbSignMapper.insertWbSign(wbSign);
    }

    /**
     * 修改签到
     * 
     * @param wbSign 签到
     * @return 结果
     */
    @Override
    public int updateWbSign(WbSign wbSign)
    {
        wbSign.setUpdateTime(DateUtils.getNowDate());
        return wbSignMapper.updateWbSign(wbSign);
    }

    /**
     * 批量删除签到
     * 
     * @param ids 需要删除的签到主键
     * @return 结果
     */
    @Override
    public int deleteWbSignByIds(Long[] ids)
    {
        return wbSignMapper.deleteWbSignByIds(ids);
    }

    /**
     * 删除签到信息
     * 
     * @param id 签到主键
     * @return 结果
     */
    @Override
    public int deleteWbSignById(Long id)
    {
        return wbSignMapper.deleteWbSignById(id);
    }
}
